<?php


namespace app\home\validate;


use think\Validate;

class Approval extends Validate
{
    protected $rule = [
        'start_time' =>  'require',
        'end_time' => 'require',
        'duration' => 'require',
        'type' => 'require',
        'attachment1' => 'require',
    ];

    protected $message = [
        'front_cover' =>  '封面图片不能为空！',
        'type' => '类型不能为空',
        'title' =>  '标题不能为空！',
        'content' => '内容不能为空',
        'attachment1' => '附件一不能为空',

    ];

    protected $scene = [
        'letter' => ['front_cover','title','content'],
        'issued' => ['front_cover','type','title','content'],
        'communication' => ['title','content','attachment1'],
    ];
}